package com.res.share.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.res.share.model.ResDown;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 下载 服务类
 * </p>
 *
 * @author astupidcoder
 * @since 2021-09-21
 */
public interface IResDownService extends IService<ResDown> {

    IPage<ResDown> findResDownList(Page<ResDown> page, Integer userId);

    void saveResDown(Integer userId, Integer articleId,Integer freeType);

    Integer findResDownNums(Integer articleId);


    /**
     * 判断用户是否下载过该资源
     * @param userId
     * @param articleId
     * @return
     */
    boolean checkArticleUpload(Integer userId,Integer articleId);



}
